<!--  -->
<template>
  <div>
    <el-descriptions class="margin-top"
                     title="用户信息"
                     :column="3"
                     :size="size"
                     border>
      <template slot="extra">
        <!-- <el-button type="primary" size="small">操作</el-button> -->
      </template>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          用户名
        </template>
        {{this.$store.getters.userinfo.name}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          账号
        </template>
        {{this.$store.getters.userinfo.username}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          密码
        </template>
        {{this.$store.getters.userinfo.password}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          真实姓名
        </template>
        {{this.$store.getters.userinfo.idname}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          性别
        </template>
        {{this.$store.getters.userinfo.sex === 1 ? '男' : '女 '}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          证件号码
        </template>
        {{this.$store.getters.userinfo.idnumber}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          电话
        </template>
        {{this.$store.getters.userinfo.iphone}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          邮箱
        </template>
        {{this.$store.getters.userinfo.email}}
      </el-descriptions-item>

      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          联系地址
        </template>
        江苏省苏州市吴中区吴中大道 1188 号
      </el-descriptions-item>

    </el-descriptions>
    <el-descriptions class="margin-top"
                     title="企业信息"
                     :column="4"
                     :size="size"
                     border
                     style="margin-top:20px"
                     v-if="this.$store.getters.userinfo.level == 1">
      <template slot="extra">
        <!-- <el-button type="primary" size="small">操作</el-button> -->
      </template>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          企业名称
        </template>
        {{this.$store.getters.userinfo.company_name}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          企业代码
        </template>
        {{this.$store.getters.userinfo.company_code}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          企业营业证号
        </template>
        {{this.$store.getters.userinfo.company_idnumber}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          企业营业证
        </template>
        <meta name="referrer"
              content="no-referrer">
        <!-- https://tse1-mm.cn.bing.net/th/id/R-C.7bdd54f1a8461ce7ec4b253ad8b406a5?rik=rDdd%2f6l1%2fw%2fVSA&riu=http%3a%2f%2fwww.huasweet.com%2fUploads%2f5a08f9ff11f42.jpg&ehk=XWEGqB1CKBJZxg84plDBaNbgHWSTZIY8zbYNa9btI0s%3d&risl=&pid=ImgRaw&r=0 -->
        <!-- <img :src="this.$store.getters.userinfo.company_idimg" alt="营业执照" style="width:100px;height:100px"> -->
        <el-image style="width: 100px; height: 100px"
                  :src="this.$store.getters.userinfo.company_idimg"
                  :preview-src-list="srcList">
        </el-image>
        <!-- <img src="https://tse1-mm.cn.bing.net/th/id/R-C.7bdd54f1a8461ce7ec4b253ad8b406a5?rik=rDdd%2f6l1%2fw%2fVSA&riu=http%3a%2f%2fwww.huasweet.com%2fUploads%2f5a08f9ff11f42.jpg&ehk=XWEGqB1CKBJZxg84plDBaNbgHWSTZIY8zbYNa9btI0s%3d&risl=&pid=ImgRaw&r=0"
             alt="营业执照"
             style="width:100px;height:100px"> -->

      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-tickets"></i>
          企业电话
        </template>
        {{this.$store.getters.userinfo.company_iphone}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-tickets"></i>
          企业邮箱
        </template>
        {{this.$store.getters.userinfo.company_email}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          业务人
        </template>
        {{this.$store.getters.userinfo.company_finance_user}}
      </el-descriptions-item>
      <!-- <el-descriptions-item>
      <template slot="label">
        <i class="el-icon-office-building"></i>
        业务电话
      </template>
      {{this.$store.getters.userinfo.company_finance_iphone}}
    </el-descriptions-item> -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          传真
        </template>
        {{this.$store.getters.userinfo.company_fax}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          企业法人
        </template>
        {{this.$store.getters.userinfo.company_user}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          法人证件号
        </template>
        {{this.$store.getters.userinfo.company_user_id}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          法人电话
        </template>
        {{this.$store.getters.userinfo.company_user_iphone}}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          法人证件照
        </template>
        <meta name="referrer"
              content="no-referrer">
        <el-image style="width: 100px; height: 100px"
                  :src="img1"
                  :preview-src-list="srcList">
        </el-image>
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          法人证件照
        </template>
        <meta name="referrer"
              content="no-referrer">
        <el-image style="width: 100px; height: 100px"
                  :src="img2"
                  :preview-src-list="srcList">
        </el-image>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
export default {
  name: 'myinfo',
  data () {
    return {
      img1: '',
      img2: '',
      // 图片放大
      srcList: [


      ]
    }
  },
  created () {
    console.log('用户信息：', this.$store.getters.userinfo)
    var arr = this.$store.getters.userinfo.company_user_idimg.split(",")
    this.img1 = arr[0]
    this.img2 = arr[1]
    console.log(this.img1, this.img2)
    // console.log(window.URL.createObjectURL(this.img1))
  },
  methods: {

  }
}
</script>

<style>
</style>
